// 云函数入口文件
const cloud = require('wx-server-sdk')
const got = require('got')

cloud.init()


// 云函数入口函数

exports.main = async (event, context) => {
  // let getResponse = await got('httpbin.org/get') //get请求 用httpbin.org这个网址做测试 
  // return getResponse.body
  let res = await got('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxd5b445bf515b5f97&secret=a2dc15ec0f633c8cd42c2db760ae4066')
  return res.body
}